package com.lucnn.diamond.spring.config;

import com.lucnn.diamond.spring.service.BookService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan(value = {
        "com.lucnn.diamond.spring.controller",
        "com.lucnn.diamond.spring.service",
        "com.lucnn.diamond.spring.dao",
})
public class DIConfig {

    @Bean
    public BookService bookService(){
        BookService bs = new BookService();
        bs.setLable(2);
        return bs;
    }

}
